﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Loaisp.aspx.cs" Inherits="Admin_Loaisp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

td.head
{
    font-weight: bold;
    font-size: 9pt;
    font-family: Tahoma;
    background-color: #fff1d7;
}
	
td
{
    font-size: 10pt;
    color: #000000;
    font-family: Tahoma;
}

.icsa, .ica
{
	background-image:url(../Images/Testing/plus_16.png);
}

.ice, .icd, .ics, .icc, .ica, .icm, .icf, .ict, .icb, .icn, .ick, .icp, .icl, .ici, .icu
{
	padding-left:22px;
	padding-top:1px;
	padding-bottom:1px;
	padding-right:3px;
	font-weight:bold;
	background-repeat:no-repeat;
	background-position: 5px center;
}

.icsc, .icc
{
	background-image:url(../Images/Testing/block_16.png);
}

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table cellpadding="4" cellspacing="0" style="width: 100%; text-align: left;">
            <tr>
                <td class="head" colspan="3">
                    CẬP NHẬT LOẠI SẢN PHẨM</td>
            </tr>
            <tr>
                <td width="15%">
                    Tên hãng</td>
                <td>
                    <asp:TextBox ID="txttenhang" runat="server" Width="95%"></asp:TextBox>
                </td>
                <td width="35%">
                    <asp:Button ID="btnthem" runat="server" CssClass="ica" Text="Thêm" 
                        onclick="btnthem_Click" />
                    <asp:Button ID="btnboqua" runat="server" CssClass="icc" Text="Bỏ qua" 
                        onclick="btnboqua_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    Danh sách hãng</td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:GridView ID="grvds" runat="server" AutoGenerateColumns="False" 
                        EnableModelValidation="True" Width="100%" DataSourceID="loaisp">
                        <Columns>
                            <asp:TemplateField HeaderText="STT">
                                <ItemStyle HorizontalAlign="Center" Width="3%" />
                                <ItemTemplate><%#Container.DataItemIndex+1 %>
                                    <asp:Label ID="lbtenhang" runat="server" Text='<%# Eval("tenloai") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Loại SP">
                            <ItemTemplate>
                                <asp:Label ID="lbten" runat="server" Text='<%#Eval("tenloai") %>'></asp:Label></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="imgsua" runat="server" 
                                        CommandArgument='<%# Eval("id_row") %>' 
                                        ImageUrl="~/images/Testing/pencil_16.png" onclick="imgsua_Click" />
                                    <asp:ImageButton ID="imgxoa" runat="server" 
                                        CommandArgument='<%# Eval("id_row") %>' 
                                        ImageUrl="~/images/Testing/delete_16.png" onclick="imgxoa_Click" 
                                        onclientclick="return confirm('Bạn có chắc muốn xóa?')" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="loaisp" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        SelectCommand="SELECT * FROM [Loaisanpham]"></asp:SqlDataSource>
                </td>
            </tr>
        </table>
    
    </div>
    <asp:Label ID="lbid" runat="server" Visible="False"></asp:Label>
    </form>
</body>
</html>
